{{ define "main" }}

{{ $pages := .Pages }}
{{ $pages = (.Paginate $pages).Pages }}

<header>
    <div class="container">
        <h1>{{ .Title }}</h1>
        <p class="subtitle">
            <span class="count">{{ len $pages }}</span> posts found.
        </p>
    </div>
</header>

<section>
    <div class="container">
        <section>
            <section>
                <div class="posts">
                    {{ range $pages }}
                    <div class="post">
                        <a href="{{ .RelPermalink }}">
                            <div class="post-row">
                                <time>{{ .Date.Format "Jan 02" }}</time>
                                <h3>{{ .Title }}</h3>
                            </div>
                            <!--<div class="new-post">New!</div>-->
                        </a>
                    </div>
                    {{ end }}
                </div>
            </section>
        </section>
    </div>
</section>

{{ end }}
